/*
 * @Title: 账户安全
 * @Created by: emiya
 */
<template>
	<view class="box">
		<comHeader :config="navConfig" />
		<view class="mainback">
			<view class="man" v-for="setmain in listdata" @tap="jump(setmain)" :key="setmain.id">
				<view>{{setmain.title}}</view>
				<view>
					<!-- <switch color="#74C146" @change="switch2Change" /> -->
					<uni-icon type="arrowright" size="20"></uni-icon>
				</view>
			</view>
		</view>
		<view class="mainback padd">
			<view class="man" v-for="setmain in listb" @tap="jump(setmain)" :key="setmain.id">
				<view>{{setmain.title}}</view>
				<view>
					<uni-icon type="arrowright" size="20"></uni-icon>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import uniIcon from "@/components/uni-icon/uni-icon.vue"
	export default {
		components: {
			uniIcon
		},
		data() {
			return {
				navConfig: {
					isFixed: false, //是否absolute布局
					left: {

						isShowLeft: true,
						leftGobackColor: 'black', //左边返回icon颜色
					},
					mid: {
						isShowMid: true,
						text: '账户与安全',
						textColor: '#000'
					},
					right: {
						text: '',
						isShowRight: false,
						ico: '', //右侧图标地址
						isShowRightIco: '' //是否显示右侧图标
					}
				},
				listdata: [{
					id: 0,
					title: "修改登陆密码",
					url: "../security/AdPassword"
				}, {
					id: 1,
					title: "修改支付密码",
					url: "../security/PaPassword"
				}, {
					id: 2,
					title: "绑定邮箱",
					url: "../security/mail"
				}],
				listb: [{
					id: 3,
					title: "注销账户",
					url: "../security/cancellation"
				}, {
					id: 4,
					title: "安全中心",
					url: ""
				}]

			}
		},
		methods: {
			switch1Change: function(e) {
				console.log('switch1 发生 change 事件，携带值为', e.target.value)
			},
			switch2Change: function(e) {
				console.log('switch2 发生 change 事件，携带值为', e.target.value)
			},
			jump(setmain) {
				uni.navigateTo({
					url: setmain.url
				})
			}
		},
	}
</script>

<style scoped>
	* {
		margin: 0;
		padding: 0;
	}

	.no-menu {
		margin-bottom: 0px;
	}

	.box {
		background-color: #F6F6F6;
		height: 100vh;
		font-size: 34upx;
	}

	.mainback {
		background: #FFFFFF;
		margin-top: 100upx;
	}

	.man {
		display: flex;
		justify-content: space-between;
		width: 90%;
		margin: auto;
		padding: 25upx 0upx;
		border-bottom: 1px solid #EEEEEE;
		font-size: 26upx;
	}

	.mainback .man:last-child {
		border-bottom: 0upx solid #FFFFFF !important;
	}

	.setimga {
		width: 30upx;
		height: 50upx;
	}

	.padd {
		margin-top: 25upx;
	}

	.setbun {
		width: 100%;
		background-color: #FFFFFF;
		text-align: center;
		margin-top: 20upx;
		padding: 25upx 0px;
	}
</style>
